<script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-45358419-1']);
    _gaq.push(['_trackPageview']);

    (function() {
        var ga = document.createElement('script');
        ga.type = 'text/javascript';
        ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
    })();

</script>
<?php
Yii::app()->clientScript
        ->registerScriptFile(Yii::app()->baseUrl . '/js/jquery.bxGallery.1.1.min.js');
?>
<div class="span5">
    <ul id="slides1">
        <li><img class="img-polaroid" src="<?php echo (Yii::app()->baseUrl . '/uploads/' . $model->img1); ?>" title='' /></li>
        <li><img class="img-polaroid" src="<?php echo (Yii::app()->baseUrl . '/uploads/' . $model->img2); ?>"  title=''/></li>

        <li><img class="img-polaroid" src="<?php echo (Yii::app()->baseUrl . '/uploads/' . $model->img3); ?>" title='' /></li>
        <li><img class="img-polaroid" src="<?php echo (Yii::app()->baseUrl . '/uploads/' . $model->img4); ?>" title='' /></li>
        <li><img class="img-polaroid" src="<?php echo (Yii::app()->baseUrl . '/uploads/' . $model->img5); ?>" title='' /></li>


    </ul>
</div>
<div class="span2 well">
    <a href="<?php echo $this->createUrl('site/contact', array('subject' => $model->title . ', id:' . $model->id)) ?>" class="btn btn-success"><i class="icon-white icon-info-sign"></i> <?php echo Yii::t("content", 'Pedir info item') ?></a>  

</div>

<?php
$this->widget('zii.widgets.CDetailView', array(
    'data' => $model,
    'attributes' => array(
        //'id',
        array(
            'label' => Yii::t('models', 'Titulo'),
            'value' => Yii::t('content',CHtml::encode($model->title),array(),'db_i18n'),
        ),
        array(
            'label' => Yii::t('models', 'Descricao'),
            'value' => Yii::t('content',CHtml::encode($model->description),array(),'db_i18n'),
        ),
        //'category_id',
        //'activ',
        //'user_id',
        'date_add',
    //'date_expire',
    //'amount',
    ),
));
?>
<script type="text/javascript">

    $(document).ready(function() {

        $('#slides1').bxGallery({
            maxwidth: 650,
            maxheight: 475,
            thumbwidth: 40,
            thumbcontainer: 90,
            opacity: .5, // opacity level of thumbnails

            thumbplacement: 'bottom', // placement of thumbnails (top, bottom, left, right)
            thumbcontainer: '450'
        });



    });
</script>